#例10.13打开一个文件并写入”Hello World” ，使用with处理
filename = 'my_file.txt'
mode = 'w'
with open(filename, mode) as writer:
    writer.write('Hello ')
    writer.write('World')
